﻿using PLCS.Application.Contracts.OrderApp.Dtos;
using Prism.Commands;
using Prism.Mvvm;

namespace PLCS.App.OrderTask.Dtos;

internal class OrderViewDto : BindableBase
{
    private bool _isExpanded;

    public bool IsExpanded
    {
        get { return _isExpanded; }
        set { SetProperty(ref _isExpanded, value); }
    }

    public OrderDto Model { get; set; }

    public DelegateCommand<OrderViewDto> ExpandedCommand => new DelegateCommand<OrderViewDto>(model =>
    {
        model.IsExpanded = !model.IsExpanded;
    });

    public OrderViewDto()
    {
    }
}